# -*- encoding=utf8 -*-
__author__ = "Bryan.Chen"

from airtest.core.api import *

auto_setup(__file__)

from poco.drivers.std import StdPoco
poco = StdPoco()

using("../FlowTest.air")
import FlowTest
        
class Hall_SwitchPage(FlowTest.BaseTestCase):
    def __init__(self):
        print("%s __init__" % (__file__))
        
    def runTest(self, args):
        print("%s runTest" % (__file__))

        page = "Hall"

        if "page" in args: 
            page = args["page"]
        
        if page == "Club":
            btn = poco("zixun_button")
        elif page == "Hall":
            btn = poco("dating_button")
        elif page == "GoldBean":
            btn = poco("jifen_button")
        if not btn.exists():
            return False

        self.clickButton(btn)

        return True
        
_instance = Hall_SwitchPage()
runTest = _instance.runTest
